<?php

/**
 * Product form.
 *
 * @package    fkshop
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ProductForm extends BaseProductForm
{
  public function configure()
  {
  	parent::configure();
 
    $this->widgetSchema['url_image'] = new sfWidgetFormInputFileEditable(array(
      'label'     => 'Photo',
      'file_src'  => '/uploads/product/'.$this->getObject()->getUrlImage(),
      'is_image'  => true,
      'edit_mode' => !$this->isNew(),
      'template'  => '<div>%file%<br />%input%<br />%delete% %delete_label%</div>',
    ));
 
    $this->validatorSchema['urlimage_delete'] = new sfValidatorPass();
  }
}
